Fill (and read) a skip list with modules from a folder?

Hi!

 

Is there any way to fill a skip list with modules which i read from a folder?

I show code:

Folder f = current
    Module myCurrentModule = null
    Item i
    
    Skip mySkipList = create
    
    int n = 0
    for i in f do
    {
        myCurrentModule = read(fullName(i), false, true)
        put(mySkipList, n, myCurrentModule)
        n++
    }
    
    
    //Debug
    //print "myCurrentModule: " myCurrentModule "\n"
    int j
    string moduleName
    for j in 1:16 do
    {
        if(find(mySkipList, j, myCurrentModule))
        {
            moduleName = read(fullName(myCurrentModule, false, true))
            print "moduleName: " moduleName "\n"
        }
    }

 

My Problem now is that, I Doors brings a failure in line "moduleName = read(fullName(myCurrentModule, false, true))". The warning says: "False argument for function fullName.

 

Can anybody help me?


tobi_mehrl - Wed May 13 03:36:30 EDT 2015

Re: Fill (and read) a skip list with modules from a folder?
SudarshanRao - Wed May 13 03:56:07 EDT 2015

The "read" perm returns a module handle, not name of module. There are also other syntax errors in that line (see line 10 to compare, which uses similar set of perms).

To get the script working, modify that line with:

moduleName = fullName(myCurrentModule)

 

Hope that helps..

Re: Fill (and read) a skip list with modules from a folder?
tobi_mehrl - Wed May 13 05:04:33 EDT 2015

SudarshanRao - Wed May 13 03:56:07 EDT 2015

The "read" perm returns a module handle, not name of module. There are also other syntax errors in that line (see line 10 to compare, which uses similar set of perms).

To get the script working, modify that line with:

moduleName = fullName(myCurrentModule)

 

Hope that helps..

Thank you for your answer.

But now:

How can I get now the first module (handle) which is in the skip list written due to the first for-loop in code above?

Re: Fill (and read) a skip list with modules from a folder?
SudarshanRao - Wed May 13 05:21:39 EDT 2015

tobi_mehrl - Wed May 13 05:04:33 EDT 2015

Thank you for your answer.

But now:

How can I get now the first module (handle) which is in the skip list written due to the first for-loop in code above?

You already have the handle in myCurrentModule - which is what is being used to get the fullName..